using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;

namespace WPCoco
{
    /// <summary>
    /// Class that give information about view port 
    /// </summary>
    public static class Screen
    {
        /// <summary>
        /// Width of the screen
        /// </summary>
        public static int Width { get { return CurrentGraphicsDevice.Viewport.Width; } }

        /// <summary>
        /// Height of the screen
        /// </summary>
        public static int Height { get { return CurrentGraphicsDevice.Viewport.Height; } }

        /// <summary>
        /// Center of the screen
        /// </summary>
        public static Vector2 Center { get { return new Vector2(Width / 2.0f, Height / 2.0f); } }

        /// <summary>
        /// Graphics device asociated to the game
        /// </summary>
        public static GraphicsDevice CurrentGraphicsDevice
        {
            get { return Coco.Shared.Game.GraphicsDevice; }
        }

        /// <summary>
        /// Return if a point is contained in the screen
        /// </summary>
        /// <param name="point">Point to test</param>
        public static bool Contain(Vector2 point) 
        {
            return (point.X >= 0 && point.X < Width && point.Y >= 0 && point.Y < Height);
        }
    }
}
